﻿<link href="/Content/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/Content/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<script src="/Content/js/plugins/iCheck/icheck.min.js"></script>
<script src="/Content/js/plugins/sweetalert/sweetalert.min.js"></script>
<style>
.app{
	width:750px;
	height:400px;
	background-image: url('/Content/images/bg.png');
	background-size:100% 100%;-moz-background-size:100% 100%;}  
}

</style>

<div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
							APP菜单管理
							<span style="float:right">
					<a href="#" onclick="update()">数据更新</a> &nbsp;&nbsp;
					
					</span>
                    </div>
					<div class="ibox-content">
					 <table class="table table-striped">
                            <thead>
					
                            <tr>
							
							    <th>菜单编号</th>
							   <th>菜单名称</th>
							   <th>图标</th>
								<th>操作</th>
								
                            </tr>
                            </thead>
                            <tbody>
						<volist name="alist" id="vo">
							<tr>
				
					<td>{$vo['code']}</td>	  
						<td>{$vo['name']}</td>	  
						<td><img src="/{$vo['imgurl']}" style="width:100px;"></td>	  
						<th><a href="/index.php/Home/Index/addmenu?code={$vo['code']}">修改</th>
				
						</tr>						
				    </volist>
					<tr>
						<td colspan="9">
						<div class="pagelist">{$page}</div>
						</td>
					</tr>
                            </tbody>
                        </table>
						 </div>
                </div>
            </div>
<script src="https://cdn.socket.io/socket.io-1.2.1.js"></script>
<script>
var socket;
$(document).ready(function(){
			
			initsocket();
			});
function initsocket(){
	socket=io.connect('{$socket}');//与服务器进行连接		
}

function update(){
		var json = {};
		json.type="updateimg";
		json.content= "";
		json.zuid= 0;
		json.tvid= 0;
		var str= JSON.stringify(json);
		console.log(str);
		socket.emit('broadcast',str);
		swal("success!", "更新成功", "success");
}
</script>	